﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CMTVision.Widgets.Framework;

namespace CMTVision.WidgetWeb
{
    public partial class TemplateContainerControl : CMTVision.Widgets.Framework.BaseTemplateContainer
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        public override Control TemplateHolder
        {
            get
            {
                return templateHolder;
            }
        }

        protected override void OnInit(EventArgs e)
        { 
            base.OnInit(e);
        }

        #region Override

        public override Control RegisterScriptOn
        {
            get
            {
                return ThreeColumnTemplateUpdatePanel;
            }
        }

        protected override void PreparingInitDragDrop()
        {
            base.PreparingInitDragDrop();

            SortableColumnClassName = Constants.Class_SortableColumn;
            DraggableWidgetContainerClassName = "widgetContainer";
            LockWidgetContainerClassName = "locked";
            SortableHandlerClassName = "widgetHeader";
            SortablePlaceHolderClassName = "widgetholder";
            TemplatePostBackTriggerClassName = Constants.Class_TriggleLinkButton;
            NewWidgetClassName = "newwidgetitem";
            NewWidgetTitleClassName = "newwidgetitemtitle";
        }

        #endregion


        #region Refresh Button

        protected void RefreshButton_Click(object sender, EventArgs e)
        {
            ThreeColumnTemplateUpdatePanel.Update();
        }

        #endregion
    }
}